<?php

namespace component\element\organcascader\controller;

use app\attribute\MethodAuth;
use app\bll\OrganCompany as BllOrganCompany;
use core\component\ElementBase;
use support\View;

class Index extends ElementBase
{
    public function index(...$param)
    {
        $bllOrganCompany = new BllOrganCompany();
        $orgs = $bllOrganCompany->cascader(
            isset($param['polymorphic'])  && in_array($param['polymorphic'], [4, 5]) ?
                true : false
        );
        View::assign('orgs', $orgs);
        return $this->view($param);
    }
}
